package com.bci.pwtz.service;

import java.util.List;

import com.bci.pwtz.common.util.PaginationList;
import com.bci.pwtz.exception.CanNotDeleteException;
import com.bci.pwtz.exception.PwtzDatabaseException;
import com.bci.pwtz.mysql.model.Dygt;

public interface DygtService {
/**
 * 添加低压杆塔
 * @param dygt
 * @return
 * @throws PwtzDatabaseException
 */
Dygt add(Dygt dygt)throws PwtzDatabaseException;
/**
 * 删除低压杆塔
 * @param deviceId
 * @return
 * @throws PwtzDatabaseException
 */
int delete(String deviceId)throws PwtzDatabaseException,CanNotDeleteException;
/**
 * 修改低压杆塔
 * @param dygt
 * @return
 * @throws PwtzDatabaseException
 */
int update(Dygt dygt)throws PwtzDatabaseException;
/**
 * 查询低压杆塔
 * @param deviceId
 * @return
 * @throws PwtzDatabaseException
 */
Dygt load(String deviceId)throws PwtzDatabaseException;
/**
 * 分页查询一段时间内修改的低压杆塔
 * @param beginTime
 * @param endTime
 * @param pageSize
 * @param pageNo
 * @return
 * @throws PwtzDatabaseException
 */
PaginationList<Dygt> selectDygts(String towername,Long companyId,int portalType,String[]medLineCodes,String lineCode,String beginTime,String endTime,int pageSize,int pageNo,String currentDeviceId) throws PwtzDatabaseException;


List<Dygt> getSameList(String deviceid)throws PwtzDatabaseException;

boolean deleteDevice(String deviceid)throws PwtzDatabaseException,CanNotDeleteException;

int getSameTowerNumber(String deviceid)throws PwtzDatabaseException;
/**
 * 一句话描述 <br/>
 * <p>Description: TODO(详细描述) 
 * <br/>
 * <p>Author: tonic<br/>
 * <p>Date: 2015-1-16-下午2:14:57<br/>
 * <p>
 * @param lastCompanyId
 * @return   
 * 
 */
int getCompanyTowerCount(Long lastCompanyId)throws PwtzDatabaseException;
public List<Dygt> getPhysicalTowerList(String deviceid,Long companyid)throws PwtzDatabaseException,CanNotDeleteException;

public int updateLastSyncDevice(Long companyId,String lastSyncTime) throws PwtzDatabaseException;
}
